package com.mes.task.domain;

import com.mes.basicdata.domain.TypesData;
import com.mes.common.domain.BasicModel;

/**
 * <p>
 * TaskLink实体，记录任务之间的关系。
 * </p>
 * 
 */
public class TaskLink extends BasicModel {

	protected String successorUid;
	
	protected Task successor;
	
	protected String precessorUid;

	protected Task precessor;
	
	protected Double linkqty;
	
	protected Long linktype;
	protected TypesData linktypeDesc;
	
	protected Long linklag;
	protected Long isineffect;
	
	/**
	 * ������״̬ӳ��--dependtype
	 */
	protected String dependtype;
	protected TypesData dependtypeDesc;

	/**
	 * �յĹ��캯��
	 */
	public TaskLink() {
	}

	/**
	 * ��ȡ�������Ψһ��
	 * @return
	 */
	public String getSuccessorUid() {
		return successorUid;
	}

	/**
	 * ���ú������Ψһ��
	 * @param successorUid
	 */
	public void setSuccessorUid(String successorUid) {
		this.successorUid = successorUid;
	}

	/**
	 * ��ȡ�������
	 * @return
	 */
	public Task getSuccessor() {
		return successor;
	}

	/**
	 * ���ú������
	 * @param successor
	 */
	public void setSuccessor(Task successor) {
		this.successor = successor;
	}

	/**
	 * ��ȡǰ����Ψһ��
	 * @return
	 */
	public String getPrecessorUid() {
		return precessorUid;
	}

	/**
	 * ����ǰ������Ψһ��
	 * @param precessorUid
	 */
	public void setPrecessorUid(String precessorUid) {
		this.precessorUid = precessorUid;
	}

	/**
	 * ��ȡǰ������
	 * @return
	 */
	public Task getPrecessor() {
		return precessor;
	}

	/**
	 * ����ǰ������
	 * @param precessor
	 */
	public void setPrecessor(Task precessor) {
		this.precessor = precessor;
	}

	/**
	 * ��ȡ��������
	 * @return
	 */
	public Double getLinkqty() {
		return linkqty;
	}

	/**
	 * ������������
	 * @param linkqty
	 */
	public void setLinkqty(Double linkqty) {
		this.linkqty = linkqty;
	}

	/**
	 * ��ȡ��������
	 * @return
	 */
	public Long getLinktype() {
		return linktype;
	}

	/**
	 * ��ȡ��������
	 * @param linktype
	 */
	public void setLinktype(Long linktype) {
		this.linktype = linktype;
	}

	/**
	 * ��ȡ�����ӳ�
	 * @return
	 */
	public Long getLinklag() {
		return linklag;
	}

	/**
	 * ���������ӳ�
	 * @param linklag
	 */
	public void setLinklag(Long linklag) {
		this.linklag = linklag;
	}

	/**
	 * �����Ƿ���Ч״̬
	 * @return
	 */
	public Long getIsineffect() {
		return isineffect;
	}

	/**
	 * �����Ƿ���Ч״̬
	 * @param isineffect
	 */
	public void setIsineffect(Long isineffect) {
		this.isineffect = isineffect;
	}

	/**
	 * ��ȡ��ϵ����,0-����֮��Ĺ�ϵ,1-�������㲿������,2-����������
	 * @return
	 */
	public String getDependtype() {
		return dependtype;
	}

	/**
	 * ���ù�ϵ����,0-����֮��Ĺ�ϵ,1-�������㲿������,2-����������
	 * @param dependtype
	 */
	public void setDependtype(String dependtype) {
		this.dependtype = dependtype;
	}

	/**
	 * ��ȡ��������,1��ʼ����,3��ʼ��ʼ
	 * @return
	 */
	public TypesData getLinktypeDesc() {
		return linktypeDesc;
	}

	/**
	 * ������������,1��ʼ����,3��ʼ��ʼ
	 * @param linktypeDesc
	 */
	public void setLinktypeDesc(TypesData linktypeDesc) {
		this.linktypeDesc = linktypeDesc;
	}

	/**
	 *  ��ȡ��ϵ����,0-����֮��Ĺ�ϵ,1-�������㲿������,2-����������
	 * @return
	 */
	public TypesData getDependtypeDesc() {
		return dependtypeDesc;
	}

	/**
	 *  ���ù�ϵ����,0-����֮��Ĺ�ϵ,1-�������㲿������,2-����������
	 * @param dependtypeDesc
	 */
	public void setDependtypeDesc(TypesData dependtypeDesc) {
		this.dependtypeDesc = dependtypeDesc;
	}

	
/*	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TaskLink))
			return false;
		TaskLink castOther = (TaskLink) other;

		return ((this.getSuccessor().getUuid() == castOther.getSuccessor().getUuid() ) || (this
				.getSuccessor().getUuid()  != null
				&& castOther.getSuccessor().getUuid()  != null && this.getSuccessor().getUuid().equals(
				castOther.getSuccessor().getUuid())))
				&& ((this.getPrecessor().getUuid() == castOther.getPrecessor().getUuid()) || (this
						.getPrecessor().getUuid() != null
						&& castOther.getPrecessor().getUuid() != null && this.getPrecessor().getUuid()
						.equals(castOther.getPrecessor().getUuid())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getSuccessor().getUuid() == null ? 0 : this.getSuccessor().getUuid().hashCode());
		result = 37 * result
				+ (getSuccessor().getUuid() == null ? 0 : this.getSuccessor().getUuid().hashCode());
		return result;
	}*/
}